/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package MessageVariable;

import java.io.Serializable;
import java.security.Key;
import javax.crypto.SecretKey;

/**
 *
 * @author LEHOANGKHANH
 */
public class ClientSign implements Serializable {
    Key publicKeyRSA =null;
    Key publicKeySign = null;
    SecretKey sessionKey = null;
    byte [] initVector;
    String ip = null;
    int port;
    String userName = null;
    String passWord = null;
    public ClientSign(){
        
    }
    public ClientSign(String ip, int port) {
        this.ip = ip;
        this.port = port;
    }
    public ClientSign(String ip, int port, String username, String pass) {
        this.ip = ip;
        this.port = port;
        this.userName = username;
        this.passWord = pass;
    }
    public ClientSign(String ip, int port, String username, String pass, Key publickeyRSA, Key publickeysign, byte[] iv) {
        this.ip = ip;
        this.port = port;
        this.userName = username;
        this.passWord = pass;
        this.publicKeyRSA = publickeyRSA;
        this.publicKeySign = publickeysign;
        this.initVector = iv;
    }
    public void setSessionKey(SecretKey key){
        this.sessionKey = key;
    }
    public SecretKey getSessionKey(){
        return this.sessionKey;
    }
    public void setIP(String ip) {
        this.ip = ip;
    }
    public void setPort(int port) {
        this.port = port;
    }
    public void setUserName(String name) {
        this.userName = name;
    }
    public void setPass(String pass) {
        this.passWord =  pass;
    }
    public void setPublicKeyRSA(Key key) {
        this.publicKeyRSA = key;
    }
    public void setPublicKeySign(Key key){
        this.publicKeySign = key;
    }
    public void setIV(byte[] iv) {
        this.initVector = iv;
    }
    public String getIP(){
        return this.ip;
    }
    public int getPort() {
        return this.port;
    }
    public String getUserName(){
        return this.userName;
    }
    public String getPassWord(){
        return this.passWord;
    }
    public Key getPublicKeyRSA(){
        return this.publicKeyRSA;
    }
    public Key getPublicKeySign(){
        return this.publicKeySign;
    }
    public byte[] getInitVector(){
       return this.initVector;
    }
}